<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">






  
  
  <link rel="stylesheet" media="all" href="/blog/lib/Han/dist/han.min.css?v=3.3">




<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="读书笔记,算法," />








  <link rel="shortcut icon" type="image/x-icon" href="/blog/favicon.ico?v=5.1.2" />






<meta name="description" content="最长不下降子序列 对于array(n)，从第一个元素开始，首先array(1)自成一个子序列，然后我们从array(2)开始往后寻找。  判断array(2)将有两种结果：    若array(2) &amp;gt;= array(1)， 则存在长度为2的不下降子序列array(1)，array(2)以及两个长度为1的不下降子序列。；  若array(2) &amp;lt; array(1)，则存在两个长度为1的">
<meta name="keywords" content="读书笔记,算法">
<meta property="og:type" content="article">
<meta property="og:title" content="动态规划（二）">
<meta property="og:url" content="https://git.oschina.net/choichumgming/blog/2017/10/10/算法学习之动态规划（二）/index.html">
<meta property="og:site_name" content="choichumgming&#39;s blog">
<meta property="og:description" content="最长不下降子序列 对于array(n)，从第一个元素开始，首先array(1)自成一个子序列，然后我们从array(2)开始往后寻找。  判断array(2)将有两种结果：    若array(2) &amp;gt;= array(1)， 则存在长度为2的不下降子序列array(1)，array(2)以及两个长度为1的不下降子序列。；  若array(2) &amp;lt; array(1)，则存在两个长度为1的">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-12-26T08:36:02.778Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="动态规划（二）">
<meta name="twitter:description" content="最长不下降子序列 对于array(n)，从第一个元素开始，首先array(1)自成一个子序列，然后我们从array(2)开始往后寻找。  判断array(2)将有两种结果：    若array(2) &amp;gt;= array(1)， 则存在长度为2的不下降子序列array(1)，array(2)以及两个长度为1的不下降子序列。；  若array(2) &amp;lt; array(1)，则存在两个长度为1的">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Gemini',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://git.oschina.net/choichumgming/blog/2017/10/10/算法学习之动态规划（二）/"/>





  <title>动态规划（二） | choichumgming's blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">choichumgming's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">stay foolish,stay hard</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-commonweal">
          <a href="/blog/404.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br />
            
            公益404
          </a>
        </li>
      
        
        <li class="menu-item menu-item-board">
          <a href="/blog/board/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-book"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://git.oschina.net/choichumgming/blog/blog/2017/10/10/算法学习之动态规划（二）/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="choichumgming">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="choichumgming's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">动态规划（二）</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-10-10T20:44:12+08:00">
                2017-10-10
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/算法与数据结构/" itemprop="url" rel="index">
                    <span itemprop="name">算法与数据结构</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-comment-o"></i>
              </span>
              
                <a href="/blog/2017/10/10/算法学习之动态规划（二）/#SOHUCS" itemprop="discussionUrl">
                  <span id="changyan_count_unit" class="post-comments-count hc-comment-count" data-xid="2017/10/10/算法学习之动态规划（二）/" itemprop="commentsCount"></span>
                </a>
              
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body han-init-context" itemprop="articleBody">

      
      

      
        <h2 id="最长不下降子序列"><a href="#最长不下降子序列" class="headerlink" title="最长不下降子序列"></a>最长不下降子序列</h2><ol>
<li>对于array(n)，从第一个元素开始，首先array(1)自成一个子序列，然后我们从array(2)开始往后寻找。 </li>
<li>判断array(2)将有两种结果： </li>
</ol>
<ul>
<li>若array(2) &gt;= array(1)， 则存在长度为2的不下降子序列array(1)，array(2)以及两个长度为1的不下降子序列。； </li>
<li>若array(2) &lt; array(1)，则存在两个长度为1的不下降子序列array(1)和array(2)。 </li>
</ul>
<ol>
<li>在判断array(i)时，我们在1~i - 1中找出一个比array(i)且最长的子序列中加入array(i)。对于每个元素i，我们需要记录的是0~i中包括i的最长子序列maxLen[i]，以及元素i所对应的前一个元素preIndex[i]。这里preIndex[i]可能可以取多个值，即当前面有多个长度相同的子序列都小于元素i，我们这里值要求取一个即可，如果题目要求输出所有的最长不下降子序列，则需要保存所有了。</li>
<li>两种要求：<br>只需要求得最长不下降子序列的长度；这时候就不需要保存前驱了；<br>需要求出最长不下降子序列；就需要保存preIndex[i]了。<br></li>
</ol>
<h2 id="最长连续子序列"><a href="#最长连续子序列" class="headerlink" title="最长连续子序列"></a>最长连续子序列<br></h2><h3 id="最长连续子序列和"><a href="#最长连续子序列和" class="headerlink" title="最长连续子序列和"></a>最长连续子序列和<br></h3><blockquote>
<p>Q:求取数组中最大连续子序列和，例如给定数组为A={1， 3， -2， 4， -5}， 则最大连续子序列和为6，即1+3+（-2）+ 4 = 6。<br></p>
<p>解法3—O（N）解法<br>&emsp; 因为最大 连续子序列和只可能是以位置0～n-1中某个位置结尾。当遍历到第i个元素时，判断在它前面的连续子序列和是否大于0，如果大于0，则以位置i结尾的最大连续子序列和为元素i和前门的连续子序列和相加；否则，则以位置i结尾的最大连续子序列和为元素i。</p>
</blockquote>
<h3 id="最长连续子序列积"><a href="#最长连续子序列积" class="headerlink" title="最长连续子序列积"></a>最长连续子序列积<br></h3><p>&emsp;做法类似于最长连续子序列和，但是，既要保存当前最大值，也要保存当前最小值，因为有可能一个负数乘上一个最小值（也是负数）会得到一个较大的积</p>
<h3 id="K个最大连续子序列和"><a href="#K个最大连续子序列和" class="headerlink" title="K个最大连续子序列和"></a>K个最大连续子序列和<br></h3><h2 id="子矩阵问题"><a href="#子矩阵问题" class="headerlink" title="子矩阵问题"></a>子矩阵问题<br></h2><p>&emsp;最大矩阵问题是最大连续子序列和问题的提升，即将一条线换成一个面，将一维问题提升为二维问题，所以我们计算最大子矩阵的方法就是将一行行的数进行累加以求得最大值。<br>&emsp;但是还有一个问题，就是应该如何高效的储存矩阵</p>
<h3 id="二维最大子矩阵问题"><a href="#二维最大子矩阵问题" class="headerlink" title="二维最大子矩阵问题"></a>二维最大子矩阵问题<br></h3><figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line"><span class="comment">//设sum[ i , j ]表示矩阵第j列前i个元素的和，a[ i , j]表示原始数据</span></div><div class="line"><span class="keyword">for</span>(<span class="keyword">int</span> i=<span class="number">1</span>;i&lt;=n;i++)</div><div class="line">		<span class="keyword">for</span>(<span class="keyword">int</span> j=<span class="number">1</span>;j&lt;m;j++)</div><div class="line">			sum[i][j]=sum[i-<span class="number">1</span>][j]+a[i][j];</div><div class="line"><span class="comment">//用三重循环求出有矩阵值，即从第i行到第j行的各列和</span></div><div class="line"><span class="keyword">for</span>(i=<span class="number">0</span>;i&lt;=n;i++)<span class="comment">//从第i行</span></div><div class="line">		<span class="keyword">for</span>(j=i+<span class="number">1</span>;j&lt;=n;j++)<span class="comment">//到第j行</span></div><div class="line">			<span class="keyword">for</span>(k=<span class="number">1</span>;k&lt;=m;k++)<span class="comment">//k从第一列到第m列</span></div><div class="line">				temp[k]=sum[j][k]-sum[i][k];</div></pre></td></tr></table></figure>
<h3 id="扩展二维子矩阵问题"><a href="#扩展二维子矩阵问题" class="headerlink" title="扩展二维子矩阵问题"></a>扩展二维子矩阵问题<br></h3><blockquote>
<p>Q:在大矩阵中确定两个小的矩阵，是这两个小矩阵中所有元素的综合最大，且无公共元素<br>A:将矩阵分成横纵切两种情况，然后在这两半中各自找出最大总和，然后相加</p>
</blockquote>
<h3 id="子矩阵变形问题"><a href="#子矩阵变形问题" class="headerlink" title="子矩阵变形问题"></a>子矩阵变形问题<br></h3><blockquote>
<p>Q:在大矩阵中给定一个大小固定的子矩阵，求怎么设置子矩阵的位置，能够使子矩阵中的元素和最大<br>A:设二维数组sum[ i ][ j ] 表示i 行j 列子矩阵之和，则<br><code>sum[ i ][ j ] =sum[ i ][ j ] +sum[ i ][ j-1 ] +sum[ i -1][ j ] -sum[ i -1][ j-1 ] +a[ i ][ j ]</code><br>如果要求从i到i+w-1行，j到j+h-1列的面积，则结果为<br><code>S =sum[ i+w-1 ][ j+h-1 ] - sum[ i-1 ][ j+h-1 ]  -sum[ i+w-1 ][ j-1 ] +sum[ i-1 ][ j-1 ]</code></p>
</blockquote>
<h2 id="合并问题"><a href="#合并问题" class="headerlink" title="合并问题"></a>合并问题<br></h2><h3 id="链状合并相邻石头代价问题"><a href="#链状合并相邻石头代价问题" class="headerlink" title="链状合并相邻石头代价问题"></a>链状合并相邻石头代价问题<br></h3><blockquote>
<p>Q:有N堆石子，现要将石子有序的合并成一堆，规定如下：每次只能移动相邻的2堆石子合并，合并花费为新合成的一堆石子的数量。求将这N堆石子合并成一堆的总花费最小（或最大）<br>A:有三类方法：第一类是先归前面几堆，再归并最后一堆。第二类，先分别归并两堆。第三类是先归并后几堆<br>可以推出动态转移方程:<br><code>当i！=j时：dp[i][j]=min(dp[i][k],dp[k+1][j])+sum[i][j]</code><br><code>当i==j时：dp[i][j]=0</code><br>dp[i][j]在此处表示从第i堆加到第j堆的最优解，而当i == j是，并不存在相加，所以结果为0.<br><br></p>
<h3 id="环状合并相邻石头代价问题："><a href="#环状合并相邻石头代价问题：" class="headerlink" title="环状合并相邻石头代价问题："></a>环状合并相邻石头代价问题：<br></h3><p>把环状拆成链状<br><code>当j&gt;i时：dp[i][j]=min(dp[i][j],dp[i][k]+dp[k+1][j]+sum[i][i+j])(i~j段的和)</code><br><code>当i==j时：dp[i][j]=0</code></p>
</blockquote>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/读书笔记/" rel="tag"># 读书笔记</a>
          
            <a href="/blog/tags/算法/" rel="tag"># 算法</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2017/09/29/岩雀滑行/" rel="next" title="岩雀滑行">
                <i class="fa fa-chevron-left"></i> 岩雀滑行
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2017/10/19/JavaScript笔记/" rel="prev" title=" JavaScript笔记">
                 JavaScript笔记 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <!--PC版-->
<div id="SOHUCS" ></div>


    

  </div>
     <div class="comments" id="comments">
       
     </div>
   





        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/blog/images/avatar.gif"
               alt="choichumgming" />
          <p class="site-author-name" itemprop="name">choichumgming</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/blog/archives/">
                <span class="site-state-item-count">15</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/blog/categories/index.html">
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              
                <span class="site-state-item-count">6</span>
                <span class="site-state-item-name">标签</span>
              
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="http://www.weibo.com/u/2558763801" target="_blank" title="微博">
                  
                    <i class="fa fa-fw fa-weibo"></i>
                  
                    
                      微博
                    
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#最长不下降子序列"><span class="nav-number">1.</span> <span class="nav-text">最长不下降子序列</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#最长连续子序列"><span class="nav-number">2.</span> <span class="nav-text">最长连续子序列</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#最长连续子序列和"><span class="nav-number">2.1.</span> <span class="nav-text">最长连续子序列和</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#最长连续子序列积"><span class="nav-number">2.2.</span> <span class="nav-text">最长连续子序列积</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#K个最大连续子序列和"><span class="nav-number">2.3.</span> <span class="nav-text">K个最大连续子序列和</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#子矩阵问题"><span class="nav-number">3.</span> <span class="nav-text">子矩阵问题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#二维最大子矩阵问题"><span class="nav-number">3.1.</span> <span class="nav-text">二维最大子矩阵问题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#扩展二维子矩阵问题"><span class="nav-number">3.2.</span> <span class="nav-text">扩展二维子矩阵问题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#子矩阵变形问题"><span class="nav-number">3.3.</span> <span class="nav-text">子矩阵变形问题</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#合并问题"><span class="nav-number">4.</span> <span class="nav-text">合并问题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#链状合并相邻石头代价问题"><span class="nav-number">4.1.</span> <span class="nav-text">链状合并相邻石头代价问题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#环状合并相邻石头代价问题："><span class="nav-number">4.2.</span> <span class="nav-text">环状合并相邻石头代价问题：</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">choichumgming</span>

  
</div>


  <div class="powered-by">
    由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
  </div>

  <span class="post-meta-divider">|</span>

  <div class="theme-info">
    主题 &mdash;
    <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
      NexT.Gemini
    </a>
  </div>


        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.2"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.2"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.2"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.2"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.2"></script>



  


  




	





  





  




  
    <script type="text/javascript">
    (function(){
      var appid = 'cytnT5dky';
      var conf = '56c170b7352bd027682e3707e9eb5071';
      var width = window.innerWidth || document.documentElement.clientWidth;
      if (width < 960) {
      window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){
        window.changyan.api.config({appid:appid,conf:conf})});
      }
    })();
    </script>
    <script type="text/javascript" src="https://assets.changyan.sohu.com/upload/plugins/plugins.count.js"></script>
  





  





  

  

  

  

  

  

</body>
</html>
